package cn.iocoder.yudao.module.system.controller.admin.user.vo.user;

import lombok.Data;

import java.util.Arrays;
import java.util.List;

/**
 * @author luchunhong
 * @date 2024/10/25/ 10:13
 * @description:
 */
@Data
public class SystemUserVo {
    /**
     * 用户ID
     */
    private Long id;
    /**
     * 账号
     */
    private String username;
    /**
     * 用户昵称
     */
    private String nickname;
    /**
     * 邮箱
     */
    private String email;
    private String mobile;
    /**
     * 店铺编号
     */
    private Long tenantId;
    /**
     * 店铺名称
     */
    private String tenantName;
    private List<String> roleNames;
    private List<String> roleCodes;
    private String avatar;

    // getters and setters

    public void setRoleNames(String roleNames) {
        this.roleNames = Arrays.asList(roleNames.split(","));
    }

    public void setRoleCodes(String roleCodes) {
        this.roleCodes = Arrays.asList(roleCodes.split(","));
    }

}
